package course;

public class Course {
    //private int number;//课程编号
    private String name;//课程名称
    private int period;//课程学时
    private int credit;//课程学分
    private String teacher;//授课老师

    public Course( String name, int period, int credit, String teacher) {//构造方法
        //this.number = number;
        this.name = name;
        this.period = period;
        this.credit = credit;
        this.teacher = teacher;
    }

    @Override
    public String toString() {//重写tostring方法
        return "课程：{" +
                "课程名称：'" + name + '\'' +
                ", 学时：" + period +
                ", 学分：" + credit +
                ", 授课老师：'" + teacher + '\'' +
                '}';
    }

  /*  public static void main(String[] args) {
        Course course=new Course("A",2,3,"LL");
        System.out.println(course);
    }*/

    /*public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }*/

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPeriod() {
        return period;
    }

    public void setPeriod(int period) {
        this.period = period;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }
}
